<?php

namespace app\admin\validate\user;

use think\Validate;

class UserValidate extends Validate
{
    protected $rule=array(
        "id"=>"require",
        "mobile"=>"require",
        "vip_id"=>"require",
        "is_writer"=>"require",
        "nickname"=>"require",
        "head_img"=>"require",
        "is_black"=>"require",
    );
    protected $message=array(
        "id|require"=>"id为空",
        "mobile|require"=>"请输入登录手机号",
        "is_writer|require"=>"请选择是否是创作者",
        "nickname|require"=>"请输入昵称",
        "head_img|require"=>"请上传头像",
        "is_black|require"=>"请选择是否是黑名单",
    );
    protected $scene=array(
        "create"=>array("mobile","is_writer","is_black"),
        "edit"=>array("id","is_writer","is_black"),
    );
}